//根模块，告诉ionic如何组中应用
//引入angular以及ionic的系统模块
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
//引入componets模块

import { ComponentsModule } from '../components/components.module';


//引入根组件
import { MyApp } from './app.component';

//页面自定义的组件
import { HomePage } from '../pages/home/home';
import { CompanyCancelPage } from '../pages/company-cancel/company-cancel';
import { LicenseagentPage } from '../pages/licenseagent/licenseagent';
import { CompanychangePage } from '../pages/companychange/companychange';

//ionic打包成app 以后配置启动画面 以及导航条的服务（不用管）
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

@NgModule({
  declarations: [/*申明组件*/
    MyApp,
    HomePage,
    CompanyCancelPage,
    LicenseagentPage,
    CompanychangePage
  ],
  imports: [/*引入的模块 依赖的模块*/
    BrowserModule,
    ComponentsModule,//注册该模块
    HttpModule,
    //IonicModule.forRoot(MyApp),
    IonicModule.forRoot(MyApp,{
      tabsHideOnSubPages: 'true' //隐藏全部子页面 tabs
    })
  ],
  bootstrap: [IonicApp],/*启动的模块*/
  entryComponents: [/*配置不会在模板中使用的组件*/
    MyApp,
    HomePage,
    CompanyCancelPage,
    LicenseagentPage,
    CompanychangePage
  ],
  providers: [/*配置服务*/
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
